/* 
 * gtkn3.c
 *  To compile: gcc -Wall gtkn3.c -o gtkn3 `pkg-config --cflags --libs gtk+-2.0`
 */

#include <gtk/gtk.h>

void destroy(void) {
  gtk_main_quit();
}

int main (int argc, char** argv) {
  gtk_init (&argc, &argv);

  GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  GtkWidget* image  = gtk_image_new_from_file(argv[1]);

  gtk_signal_connect(GTK_OBJECT (window), "destroy",
             GTK_SIGNAL_FUNC (destroy), NULL);

  gtk_container_add(GTK_CONTAINER (window), image);

  gtk_widget_show_all(window);

  gtk_main();

  return 0;
}
